package com.sharemarking.system.service;

import com.sharemarking.system.mapper.DictMapper;
import com.sharemarking.wa.common.entity.Dict;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("dictService")
public class DictService {
	
	@Autowired
	private DictMapper dm;
	
	public String getByTypeAndValue(String type,String value) {
		Dict dict = dm.getByTypeAndValue(type, value);
		return dict==null?"":dict.getLabel();
	}
	
	public List<Dict> getByType(String type) {
		return dm.getByType(type);
	}
	
}
